<template>
	<el-card class="form-container">
		<el-form :model="goodsBrandDetail" label-width="100px">
			<el-form-item label="品牌名称" prop="brandName">
				<el-input v-model="goodsBrandDetail.brandName" readonly></el-input>
			</el-form-item>
			<el-form-item label="品牌LOGO" prop="brandImageUrl" >
				<img  :src="goodsBrandDetail.brandImageUrl" class="avatar">
			</el-form-item>
			<el-form-item label="首字母" prop="brandAcronym">
				<el-input v-model="goodsBrandDetail.brandAcronym" readonly></el-input>
			</el-form-item>
			<el-form-item label="品牌排序" prop="brandSort">
				<el-input v-model="goodsBrandDetail.brandSort" readonly></el-input>
			</el-form-item>
			<el-form-item label="状态" prop="brandStatus">
				<el-radio-group v-model="goodsBrandDetail.brandStatus" >
					<el-radio  :label="1">启用</el-radio>
					<el-radio  :label="2">禁用</el-radio>
				</el-radio-group>
			</el-form-item>
			<el-form-item label="创建时间" prop="createTime">
				<el-input v-model="goodsBrandDetail.createTime" readonly></el-input>
			</el-form-item>
			<template v-if="goodsBrandDetail.updateTime">
				<el-form-item label="修改时间" prop="updateTime">
					<el-input v-model="goodsBrandDetail.updateTime" readonly></el-input>
				</el-form-item>
			</template>
			<el-form-item>
				<el-button @click="close">关闭</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findGoodsBrandDetail } from '@/api/mall/goodsBrand'
	export default {
		name: 'view-goodsBrand',
		data() {
			return {
				goodsBrandDetail: {},
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findGoodsBrandDetail(val).then(res => {
					this.goodsBrandDetail = res.data.responseData
				})
			},
			close() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
